
$(function () {
	var element = layui.element;
	element.render();

	var form = layui.form;
	form.render();

	tt.Conf.errorStyle = 'alert';
    tt.Conf.clearOtherError = true;
    
	//给加js验证
	tt.vf.req.addId('loginname');
    tt.vf.email.addId("loginname");

});



function retrievePwd(evt, form1) {
	if (!tt.validateForm('form1')) {   //loginForm是form的name  
		return false;
	}
	var data = $(form1).serialize();
	ajax.post('/register/retrievePwd', {
		data: data,
		success: function (resp) {
			if (resp.ok) {
				layer.alert(resp.msg);
			} else {
				layer.alert(resp.msg);
			}
		}
	});
}